Repository navigation
test(map): add benchmarks for v1 and q10 map parsing and rendering - #970
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The documented CodSpeed workflow lacks its dependency, and invalid iteration counts can crash the CLI.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds benchmark and profiling coverage for V1 and Q10 map parsing and rendering.
Changes:
- Adds five pytest/CodSpeed benchmark workloads.
- Adds synthetic full-scale Q10 rendering data.
- Adds standalone timing and
cProfilereporting.
| File | Summary | Findings |
|---|---|---|
tests/map/test_benchmarks.py |
Benchmark tests and standalone profiling runner | Add the CodSpeed development dependency and validate positive --iterations values. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
I like where this is heading :) Trying to think of some edge cases that are worth encoding here:
Should we be comparing the pixels of the images as well? |
|
Thanks for the feedback @Lash-L! I've updated the benchmark suite to incorporate all of those permutations:
|
53674bd to
79bba04
Compare
79bba04 to
ee6e680
Compare
allenporter
left a comment
There was a problem hiding this comment.
Fixed merge conflicts, can you approve again? Thank you.

Description
Adds a comprehensive benchmark and profiling suite for Roborock V1 and Q10 map parsing in
tests/map/test_benchmarks.py.Capabilities
pytest, and automatically collects high-precision wall-time/callgraph benchmarks when run withpytest --codspeed.python -m tests.map.test_benchmarksor with--profileto print latency percentiles (min, median, mean, p95), ops/sec, andcProfilehotspot breakdowns.PNG), color mode (RGBA), and non-empty bounding boxes on every rendered benchmark output outside the timed loop to guarantee benchmarked changes preserve visual output correctness.Workloads & Permutations Benchmarked
drawables=[]) vs default drawables vs all available drawables (list(Drawable)).s5_fw2008_with_segments.bin).s6_fw2652_with_active_segment_and_no_mop_zone.bin).b01_q10_map.bin).b01_q10_map.bin).Baseline Benchmark Results